def inbound_0():
  """I5.  Inbound call to DN3, agent NR-R, release DN2 """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(DN3)
  AilAg3.SetReady()
  AilAg3.AnswerCall()
  AilAg3.ReleaseCall()

def inbound_1():
  """I1. Inbound call  to DN3, release DN3 """
  Ext1AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.ReleaseCall()

def inbound_2():
  """I2. Inbound call  to DN3, release Ext DN """
  Ext1AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  Ext1AilAg1.ReleaseCall()

def inbound_3():
  """I3.  Inbound call  to DN3, abnormal release ExtDn """
  Ext1AilAg1.MakeCall(DN3)
  Ext1AilAg1.ReleaseCall()

def inbound_4():
  """I4.  Inbound call  to ACD3, release DN3 """
  Ext1AilAg1.MakeCall(ACD3)
  AilAg3.AnswerCall()
  AilAg3.ReleaseCall()

def inbound_5():
  """I5.  Inbound call to ACD3, agent NR-R, release DN2 """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(ACD3)
  AilAg3.SetReady()
  AilAg3.AnswerCall()
  AilAg3.ReleaseCall()

def inbound_6():
  """I6.  Inbound call  to ACD3, release ExtDn """
  Ext1AilAg1.MakeCall(ACD3)
  AilAg3.AnswerCall()
  Ext1AilAg1.ReleaseCall()

def inbound_7():
  """I7.  Inbound call  to ACD3, abnormal release ExtDn """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(ACD3)
  Ext1AilAg1.ReleaseCall()
  AilAg3.SetReady()
  
  
def inbound_17():
  """I17.  Inbound call to DN2,DN2 two step transfer to DN3,rel DN3 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.InitiateTransfer(DN3)
  AilAg3.AnswerCall()
  AilAg2.CompleteTransfer()
  AilAg3.ReleaseCall()

def inbound_18():
  """I18.  Inbound call to DN2,DN2 init  trans to DN3, abn rel DN2 """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.InitiateTransfer(DN3)
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg2.ReleaseCall()
  AilAg3.SetReady()
  
def inbound_19():
  """I19.  Inbound call to DN2,DN2 tinit DN3,DN3 ans,rel DN2 """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.InitiateTransfer(DN3)
  Ext1AilAg1.ReleaseCall()
  AilAg3.SetReady()
  AilAg2.ReleaseCall()

def inbound_20():
  """I20.  Inbound call to DN2,DN2 blind two step transfer to DN3, """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(DN2)
  time.sleep(3)
  AilAg2.InitiateTransfer(ACD3)
  AilAg2.CompleteTransfer()
  AilAg3.SetReady()
  time.sleep(3)
  AilAg3.ReleaseCall()


def inbound_21():
  """I21.  Inbound call to DN2,DN2 two step transf to ACD3,rel DN3 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.InitiateTransfer(ACD3)
  AilAg3.AnswerCall()
  AilAg2.CompleteTransfer()
  AilAg3.ReleaseCall()

def inbound_22():
  """I22.  Inbound call to DN2,DN2 init transfer to ACD3, abn rel DN2 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateTransfer(ACD3)
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg2.ReleaseCall()
  AilAg3.SetReady()

def inbound_23():
  """I23.  Inbound call to DN2,DN2 two step trans ACD3, ag NR-R, rel DN3 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateTransfer(ACD3)
  AilAg3.SetReady()
  AilAg3.AnswerCall()
  AilAg2.CompleteTransfer()
  AilAg3.ReleaseCall()

def inbound_24():
  """I24.  Inbound call to DN2,DN2 blind two step transfer to ACD3,  """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.InitiateTransfer(ACD3)
  AilAg2.CompleteTransfer()
  AilAg3.SetReady()
  AilAg3.ReleaseCall()

def inbound_25():
  """I25.  Inbound call to ACD2,DN2 two step trans to DN3,rel DN3 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.InitiateTransfer(DN3)
  AilAg3.AnswerCall()
  AilAg2.CompleteTransfer()
  AilAg3.ReleaseCall()

def inbound_26():
  """I26. Inbound call to ACD2,DN2 tinit to DN3, abn rel DN2, rel DN2"""
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.InitiateTransfer(DN3)
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg2.ReleaseCall()
  AilAg3.SetReady()
  
#def inbound_27():
#  """I27.  Inbound call to ACD2,DN2 blind two step transfer to DN3, """
#  Ext1AilAg1.MakeCall(ACD2)
#  AilAg3.SetNotReady()
#  time.sleep(3)
#  AilAg2.InitiateTransfer(DN3)
#  AilAg2.CompleteTransfer()
#  time.sleep(3)
#  AilAg3.SetReady()   ## this line sends error(phyton)
#  time.sleep(3)
#  AilAg3.ReleaseCall()

def inbound_28():
  """I28.  Inbound call to ACD2,DN2 two step transf to ACD3,release DN3 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.InitiateTransfer(ACD3)
  AilAg3.AnswerCall()
  AilAg2.CompleteTransfer()
  AilAg3.ReleaseCall()

def inbound_29():
  """I29.  Inbound call to ACD2,DN2 tinit to ACD3, abn rel DN2 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateTransfer(ACD3)
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg2.ReleaseCall()
  AilAg3.SetReady()

def inbound_30():
  """I30.  Inbound call to ACD2,DN2 two step trans ACD3, ag NR-R, rel DN3 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateTransfer(ACD3)
  AilAg3.SetReady()
  AilAg3.AnswerCall()
  AilAg2.CompleteTransfer()
  AilAg3.ReleaseCall()

def inbound_31():
  """I31.  Inbound call to ACD2,DN2 blind transfer to ACD3 """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.InitiateTransfer(ACD3)
  AilAg2.CompleteTransfer()
  AilAg3.SetReady()
  AilAg3.ReleaseCall()

def inbound_32():
  """I32.  Inbound call to ACD2,tinit DN3,rel ExtDN,ans DN3, rel DN3 """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.InitiateTransfer(DN3)
  Ext1AilAg1.ReleaseCall()
  AilAg3.SetReady()
  AilAg3.ReleaseCall()

def inbound_33():
  """I33.  Inbound call to ACD2,tinit ACD3,rel ExtDN,ans DN3,rel DN3 """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.InitiateTransfer(ACD3)
  Ext1AilAg1.ReleaseCall()
  AilAg3.SetReady()
  AilAg3.ReleaseCall()

def inbound_34():
  """I34.  Inbound call to ACD2, tinit to busy ACD3, rel ExtDN,rel DN2 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateTransfer(ACD3)
  Ext1AilAg1.ReleaseCall()
  AilAg2.ReleaseCall()
  AilAg3.SetReady()

def inbound_35():
  """I35.  Inbound call to ACD2, tinit to busy ACD3, rel ExtDN,agent ready, rel  DN2"""
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateTransfer(ACD3)
  Ext1AilAg1.ReleaseCall()
  AilAg3.SetReady()
  AilAg2.ReleaseCall()

def inbound_36():
  """I36.  Inbound call to ACD2 ,tinit to busy ACD3, rel ExtDN, agent ready, rel DN2 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateTransfer(ACD3)
  Ext1AilAg1.ReleaseCall()
  AilAg3.SetReady()
  AilAg2.ReleaseCall()

def inbound_37():
  """I37.  Inbound call to ACD2, tinit to busy  ACD3,rel ExtDN,agent ready,DN3 ans,rel DN3"""
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateTransfer(ACD3)
  Ext1AilAg1.ReleaseCall()
  AilAg3.SetReady()
  AilAg3.AnswerCall()
  AilAg3.ReleaseCall()

def inbound_38():
  """I38.  Inbound call to DN2,DN2 conference to DN3,release DN3,DN2 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.InitiateConference(DN3)
  AilAg3.AnswerCall()
  AilAg2.CompleteConference()
  AilAg2.ReleaseCall()
  AilAg3.ReleaseCall()

def inbound_39():
  """I39.  Inbound call to DN2,DN2 conference to DN3, rel ExtDn, DN2 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.InitiateConference(DN3)
  AilAg3.AnswerCall()
  AilAg2.CompleteConference()
  Ext1AilAg1.ReleaseCall()
  AilAg2.ReleaseCall()

def inbound_40():
  """I40.  Inbound call to DN2,DN2 cinit to DN3,abnormal rel DN2, rel DN2 """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.InitiateConference(DN3)
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg2.ReleaseCall()
  AilAg3.SetReady()
  
def inbound_41():
  """I41.  Inbound call to DN2,DN2 conference to ACD3, rel DN , DN2 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.InitiateConference(ACD3)
  AilAg3.AnswerCall()
  AilAg2.CompleteConference()
  AilAg2.ReleaseCall()
  AilAg3.ReleaseCall()

def inbound_42():
  """I42.  Inbound call to DN2,DN2 cinit to ACD3, abn rel DN2, rel DN2 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateConference(ACD3)
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg2.ReleaseCall()
  AilAg3.SetReady()

def inbound_43():
  """I43.  Inbound call to DN2,DN2  conf to ACD3, ag NR-R, rel DN3, DN2 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateConference(ACD3)
  AilAg3.SetReady()
  AilAg3.AnswerCall()
  AilAg2.CompleteConference()
  AilAg3.ReleaseCall()
  AilAg2.ReleaseCall()

def inbound_44():
  """I44.  Inbound call to ACD2,DN2 conf to DN3,rel DN3,DN2 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.InitiateConference(DN3)
  AilAg3.AnswerCall()
  AilAg2.CompleteConference()
  AilAg3.ReleaseCall()
  AilAg2.ReleaseCall()

def inbound_45():
  """I45.  Inbound call to ACD2,DN2 conf to DN3, rel ExtDn, DN2 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.InitiateConference(DN3)
  AilAg3.AnswerCall()
  AilAg2.CompleteConference()
  Ext1AilAg1.ReleaseCall()
  AilAg2.ReleaseCall()

def inbound_46():
  """I46.  Inbound call to ACD2,DN2 cinit to DN3,abn rel DN2, rel DN2 """
  AilAg3.SetNotReady()
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.InitiateConference(DN3)
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg2.ReleaseCall()
  AilAg3.SetReady()
  
def inbound_47():
  """I47.  Inbound call to ACD2,DN2 conf to ACD3, rel DN , DN2 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.InitiateConference(ACD3)
  AilAg3.AnswerCall()
  AilAg2.CompleteConference()
  AilAg3.ReleaseCall()
  AilAg2.ReleaseCall()

def inbound_48():
  """I48.  Inbound call to ACD2,DN2 cinit to ACD3, abn rel DN2, rel DN2 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateConference(ACD3)
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg2.ReleaseCall()
  AilAg3.SetReady()

def inbound_49():
  """I49.  Inbound call to ACD2,DN2 to ACD3, ag NR-R, rel DN3, DN2 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.InitiateConference(ACD3)
  AilAg3.SetReady()
  AilAg3.AnswerCall()
  AilAg2.CompleteConference()
  AilAg3.ReleaseCall()
  AilAg2.ReleaseCall()

def inbound_50():
  """I50.  Inbound call to DN2,DN2 SingleStep transfer to DN3,release DN3 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.SingleStepTransfer(DN3)
  AilAg3.AnswerCall()
  AilAg3.ReleaseCall()

def inbound_51():
  """I51.  Inbound call to DN2,DN2 SingleStep transfer to ACD3,rel DN3 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.SingleStepTransfer(ACD3)
  AilAg3.AnswerCall()
  AilAg3.ReleaseCall()

def inbound_52():
  """I52.  Inbound call to DN2,DN2 SingleStep transf to ACD3, ag NR-R, rel DN3 """
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.SingleStepTransfer(ACD3)
  AilAg3.SetReady()
  AilAg3.AnswerCall()
  AilAg3.ReleaseCall()

def inbound_53():
  """I53.  Inbound call to ACD2,DN2 SingleStep transfer to DN3,release DN3 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.SingleStepTransfer(DN3)
  AilAg3.AnswerCall()
  AilAg3.ReleaseCall()

def inbound_54():
  """I54.  Inbound call to ACD2,DN2 SingleStep transf to ACD3,rel DN3 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.SingleStepTransfer(ACD3)
  AilAg3.AnswerCall()
  AilAg3.ReleaseCall()

def inbound_55():
  """I55.  Inbound call to ACD2,DN2 SingleStep trans to ACD3, ag NR-R, rel DN3 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.SingleStepTransfer(ACD3)
  AilAg3.SetReady()
  AilAg3.AnswerCall()
  AilAg3.ReleaseCall()

def inbound_56():
  """I56.  Inbound call to ACD2,DN2 SingleStep trans to busy ACD3,  rel DN3 """
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg3.SetNotReady()
  AilAg2.SingleStepTransfer(ACD3)
  Ext1AilAg1.ReleaseCall()
  AilAg3.SetReady()
